From: Hellyna Ng Date: Tue, 11 Jan 2011 21:33:03 +0000 (+0800) Subject: Notifications with CRITICAL urgency are no longer timed out X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9301 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=81714ce1a34ffe92b27e2d2ebb0b9298601e9669;p=gnome-shell.git Notifications with CRITICAL urgency are no longer timed out Notifications with CRITICAL urgency should not pop down until the user interacts with them. https://bugzilla.gnome.org/show_bug.cgi?id=630942 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 04a968b56..da8f7e891 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1379,7 +1379,7 @@ MessageTray.prototype = { let notificationsPending = this._notificationQueue.length > 0; let notificationPinned = this._pointerInTray && !this._pointerInSummary && !this._notificationRemoved; let notificationExpanded = this._notificationBin.y < 0; - let notificationExpired = (this._notificationTimeoutId == 0 && !this._pointerInTray && !this._locked) || this._notificationRemoved; + let notificationExpired = (this._notificationTimeoutId == 0 && !(this._notification && this._notification.urgency == Urgency.CRITICAL) && !this._pointerInTray && !this._locked) || this._notificationRemoved; if (this._notificationState == State.HIDDEN) { if (notificationsPending) @@ -1527,7 +1527,8 @@ MessageTray.prototype = { }, _showNotificationCompleted: function() { - this._updateNotificationTimeout(NOTIFICATION_TIMEOUT * 1000); + if (this._notification.urgency != Urgency.CRITICAL) + this._updateNotificationTimeout(NOTIFICATION_TIMEOUT * 1000); }, _updateNotificationTimeout: function(timeout) {